﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="NewPackage.aspx.cs" Theme="SystemSkin" Inherits="Admin_NewShipment" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <link rel="stylesheet" href='<%# ResolveClientUrl("~/Styles/modalPopup.css") %>' type="text/css" />
    <style type="text/css">
        .modalTextBoxBackground
        {
            background-color: black;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }

        .modalTextBox
        {
            border: 1px solid #FFFFFF;
            background-color: #0066CC;
            color: #00FFFF;
        }
    </style>
    <script type="text/javascript">
        function bindData() {
            var cname = $('#<%= txtName.ClientID%>').val();
            $("#spanName").text(cname);
        }

    

        $(document).ready(function () {

        });

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h1><span>New Shipment</span></h1>
    <asp:UpdatePanel runat="server" ID="upanel1">
        <ContentTemplate>
            <div class="box">
                <h2>Sender Info</h2>
                <asp:Panel runat="server" ID="panelNonMemberInfo" Style="display: block;" CssClass="form">
                    <div class="oneline">
                        <asp:TextBox ID="txtName" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="txtName_TextBoxWatermarkExtender" runat="server" Enabled="True" TargetControlID="txtName" WatermarkCssClass="watermarked" WatermarkText="Name">
                        </asp:TextBoxWatermarkExtender>
                        <%--<label>Name</label>--%>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName" ErrorMessage="*"></asp:RequiredFieldValidator>
                    </div>

                    <div class="oneline">
                        <asp:TextBox ID="txtEmail" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" Enabled="True" TargetControlID="txtEmail" WatermarkCssClass="watermarked" WatermarkText="Email">
                        </asp:TextBoxWatermarkExtender>
                        <%--<label>Email</label>--%>
                    </div>
                    <div class="oneline">
                        <asp:TextBox ID="txtNRIC" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3" runat="server" Enabled="True" TargetControlID="txtNRIC" WatermarkCssClass="watermarked" WatermarkText="NRIC">
                        </asp:TextBoxWatermarkExtender>
                        <%--<label>NRIC</label>--%>
                    </div>

                    <div class="oneline">
                        <asp:TextBox ID="txtContact" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender4" runat="server" Enabled="True" TargetControlID="txtContact" WatermarkCssClass="watermarked" WatermarkText="Contact Number">
                        </asp:TextBoxWatermarkExtender>
                        <%--<label>Contact</label>--%>
                    </div>

                    <div class="oneline">
                        <asp:TextBox ID="txtBlock" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtBlock" WatermarkText="Unit &amp; Block" WatermarkCssClass="watermarked"></asp:TextBoxWatermarkExtender>
                        <asp:TextBox ID="txtStreet" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextStreet_TextBoxWatermarkExtender" runat="server" Enabled="True" TargetControlID="txtStreet" WatermarkCssClass="watermarked" WatermarkText="Street">
                        </asp:TextBoxWatermarkExtender>
                        <asp:TextBox ID="txtCity" runat="server" SkinID="mediumTextBox" ></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextCity_TextBoxWatermarkExtender" runat="server" Enabled="True" TargetControlID="txtCity" WatermarkCssClass="watermarked" WatermarkText="City">
                        </asp:TextBoxWatermarkExtender>
                        <asp:TextBox ID="txtProvince" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextProvince_TextBoxWatermarkExtender" runat="server" Enabled="True" TargetControlID="txtProvince" WatermarkCssClass="watermarked" WatermarkText="Province">
                        </asp:TextBoxWatermarkExtender>
                        <asp:DropDownList ID="ddlCountry" runat="server" Style="width: 100px;"></asp:DropDownList>
                        <%--<label>Address</label>--%>
                    </div>
                </asp:Panel>

             <%--   <hr />--%>
               <%-- <div style="text-align: center">
                    <asp:HyperLink ID="linkNonMember" NavigateUrl="javascript:showLogin();" runat="server" Style="font-size: 14pt; font-weight: bold">I Am A Member</asp:HyperLink>
                </div>--%>

           <%--     <asp:Panel runat="server" ID="panelLogin" CssClass="form" Style="display: none;">
                    <div class="oneline">
                        <asp:TextBox ID="txtLoginUserName" runat="server"></asp:TextBox><label>User Email</label>
                    </div>
                    <div class="oneline">
                        <asp:TextBox ID="txtLoginPassword" runat="server"></asp:TextBox><label>Password</label>
                    </div>
                    <div class="online">
                        <asp:Label ID="lblLoginFail" runat="server" Text="Login Failed! User Email and Password does not match." ForeColor="Red" Visible="false"></asp:Label>
                    </div>
                    <asp:Button ID="btnLogin" CausesValidation="false" runat="server" Text="Login" CssClass="submit" OnClick="btnLogin_Click" />
                </asp:Panel>--%>
            </div>
            <asp:Panel runat="server" ID="panelPackageInfo" CssClass="form box">
                <h2>Package Info</h2>

                <div class="oneline">
                    <asp:DropDownList ID="ddlParcelType" runat="server">
                    </asp:DropDownList>
                    <label>ParcelType</label>
                </div>
                <div class="oneline">
                    <asp:DropDownList ID="ddlFragile" runat="server">
                        <asp:ListItem Value="true">Yes</asp:ListItem>
                        <asp:ListItem Value="false">No</asp:ListItem>
                    </asp:DropDownList>
                    <label>Fragile</label>
                </div>

                <div class="oneline">
                    <asp:TextBox ID="txtWeight" runat="server" Text="0"></asp:TextBox>

                    <label>Weight</label>
                          <br />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                        ControlToValidate="txtWeight" ErrorMessage="*Please fill in the weight" 
                        ForeColor="Red" Display="Dynamic" ></asp:RequiredFieldValidator>
                        
                    <asp:CompareValidator id="CompareFieldValidator1" runat="server"
        ControlToValidate="txtWeight"
        ValueToCompare="0"
        Type="Double"
        Operator="GreaterThan"
        ErrorMessage="*Weight cannot be 0." ForeColor="Red" Display="Dynamic"></asp:CompareValidator >
                </div>
            </asp:Panel>

            <asp:Panel runat="server" ID="panelReceiver" CssClass="box form">
                <h2>Receiver</h2>
                <div class="oneline">
                    <asp:TextBox ID="txtReName" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                    <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender9" runat="server" TargetControlID="txtReName" WatermarkText="Name" WatermarkCssClass="watermarked"></asp:TextBoxWatermarkExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtReName" ErrorMessage="*"></asp:RequiredFieldValidator>
                    <%--<label>Name</label>--%>
                    <asp:TextBox ID="txtReContact" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                    <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender10" runat="server" TargetControlID="txtReContact" WatermarkText="Contact" WatermarkCssClass="watermarked"></asp:TextBoxWatermarkExtender>
                    <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtReContact" ErrorMessage="*"></asp:RequiredFieldValidator>--%>
                </div>
                <div class="oneline">
                    <asp:TextBox ID="txtReBlock" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                    <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender5" runat="server" TargetControlID="txtReBlock" WatermarkText="Unit &amp; Block" WatermarkCssClass="watermarked"></asp:TextBoxWatermarkExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtReBlock" ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:TextBox ID="txtReStreet" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                    <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender6" runat="server" Enabled="True" TargetControlID="txtReStreet" WatermarkCssClass="watermarked" WatermarkText="Street">
                    </asp:TextBoxWatermarkExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtReStreet" ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:TextBox ID="txtReCity" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                    <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender7" runat="server" Enabled="True" TargetControlID="txtReCity" WatermarkCssClass="watermarked" WatermarkText="City">
                    </asp:TextBoxWatermarkExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtReCity" ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:TextBox ID="txtReProvince" runat="server" SkinID="mediumTextBox"></asp:TextBox>
                    <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender8" runat="server" Enabled="True" TargetControlID="txtReProvince" WatermarkCssClass="watermarked" WatermarkText="Province">
                    </asp:TextBoxWatermarkExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtReProvince" ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:DropDownList ID="ddlReCountry" runat="server" Style="width: 100px;"></asp:DropDownList>
                    <%--<label>Address</label>--%>
                </div>
            </asp:Panel>

            <asp:Button ID="btnSubmit" runat="server" CausesValidation="true"
                Text="Submit" OnClick="btnSubmit_Click" CssClass="submit" />


            <asp:Panel runat="server" ID="panelModalUp" CssClass="popwindow">
                <div class="heading">
                    Hi
                    <asp:Label runat="server" Style="color: blue; font-weight: normal;" ID="spanName"></asp:Label>,&nbsp; Do you want to join us?
                </div>
                <div class="content">
                    <div>
                        <table style="width: 100%; text-align: left;">
                            <tr>
                                <td>Email</td>
                                <td>
                                    <asp:TextBox ID="txtMemberEmail" runat="server"></asp:TextBox></td>

                            </tr>
                            <tr>
                                <td>Password</td>
                                <td>
                                    <asp:TextBox ID="txtMemberPassword" runat="server" TextMode="Password"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td>Confirm Password</td>
                                <td>
                                    <asp:TextBox ID="txtMemberRePassword" runat="server" TextMode="Password"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td colspan="2" style="color:red"><asp:Label runat="server" ID="lblPasswordError" Visible="false">Two password does not match.</asp:Label></td>
                            </tr>
                        </table>

                    </div>
                    <div style="padding-top: 10px;">
                        <asp:Button ID="btnRegister" runat="server" Text="Yes!" OnClick="btnRegister_Click" />
                        <asp:Button ID="btnGoon" runat="server" Text="No, Continue" OnClick="btnGoon_Click" />
                        <br />
                        <asp:LinkButton ID="btnCloseModal" runat="server" Text="Modify Information" />
                    </div>
                </div>

            </asp:Panel>
            <asp:HiddenField runat="server" ID="hidButton" />
            <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" CancelControlID="btnCloseModal" BackgroundCssClass="modalTextBoxBackground" TargetControlID="hidButton" PopupControlID="panelModalUp"></asp:ModalPopupExtender>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>


